package com.guang.interupt.park;

import java.util.concurrent.locks.LockSupport;

public class LockSupportTestFour {
    public static void main(String[] args) throws InterruptedException {
        Thread thread1 = new Thread(() -> {
            System.out.println(String.format("当前线程的名称是：%s", Thread.currentThread().getName()));
            LockSupport.park();
            System.out.println("hello,locksupport");
            LockSupport.park();
            System.out.println("hello,locksupport");
        });
        thread1.start();
        Thread.sleep(3000);
        thread1.interrupt();
    }
}